Hi Bob,
KFLOP has a double precision asin() function as well as a single precision asinf() function that would be slightly faster. I think both execute in less than a usec.
to make a table of floating point values in C you might do something like:
float TableA[5] = {1.0, 2.0, 3.0, 4.0,5.0};
float TableB[5] = {1.0, 2.0, 3.0, 4.0,5.0};
then
result = asinf(TableA[i] * TableB[j]);
I'm not sure what you mean by the "K-axis"
Hope this helps
TK
Group: DynoMotion |
Message: 4143 |
From: bob_burig |
Date: 2/29/2012 |
Subject: Re: What is the code to do arcsin |
Thanks for that Tom,
Of the 14 motors in my system, one is simply the K-axis.
Bob
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bob,
> Â
> KFLOP has a double precision asin() function as well as a single precision asinf() function that would be slightly faster. I think both execute in less than a usec.
> Â
> to make a table of floating point values in C you might do something like:
> Â float TableA[5] = {1.0, 2.0, 3.0, 4.0,5.0};
> float TableB[5] = {1.0, 2.0, 3.0, 4.0,5.0};
> Â
> then
> Â
> result = asinf(TableA[i] * TableB[j]);
> Â
> I'm not sure what you mean by the "K-axis"
> Â
> Hope this helps
> TK
> Â
>
>
> ________________________________
> From: bob_burig <bob_burig@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, February 29, 2012 1:07 PM
> Subject: [DynoMotion] What is the code to do arcsin
>
>
> Â
> I want to program the K-axis that is a function of 2 other variables.
> The K-axis position is arcsin(a*b), where a & b are table values.
>
|
|
| |